package com.baizhi.controller;

import com.baizhi.annotation.LogRecord;
import com.baizhi.enums.LogTypeEnum;
import com.baizhi.service.BzLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author yu
 */
@RestController
public class BzLogController {
    @Autowired
    private BzLogService bzLogService;

    @RequestMapping("/bzLog/showAll")
    @LogRecord(type = LogTypeEnum.SELECT,content = "查询日志")
    public Map selectAll(@RequestParam(required = false) String search,Integer page,Integer limit){
        Map map = bzLogService.showAll(search, page, limit);
        return map;
    }
}
